c#
visual studio
array
string-array
published on: 1 June 2020
Well you can't add items to an array, since it has fixed length. What you're looking for is a List
, which can later be turned to an array using list.ToArray(), e.g.
List list = new List();
list.Add("your new value");
list.Add("your another value");
String[] str = list.ToArray();
/*use the str with loop or directly retrive like string[0]. string[1] etc*/